<div id="api-header">
    <h2>
        <span class="api-type" *ngIf="api?.type === 0">REST</span>
        <span class="api-type" *ngIf="api?.type === 1">Dubbo</span>
        {{api?.name}}
    </h2>
    <div class="position-right">
        <a class="api-call-link" [routerLink]="['/doc', doc.artifact.id, api.key]">返回文档</a>
    </div>
    <ng-container *ngIf="api?.type === 0">
        <div class="api-doc-item">
            <h3 class="display-inline-block">接口：</h3>
            <ul>
                <li *ngFor="let path of api?.paths">
                    {{path}}
                </li>
            </ul>
        </div>
        <div class="api-doc-item">
            <h3>方法：</h3>
            <ul class="display-inline-block">
                <li *ngFor="let method of api?.methods">
                    {{method}}
                </li>
                <ng-container *ngIf="!api?.methods">
                    <li>GET</li>
                    <li>POST</li>
                </ng-container>
            </ul>
        </div>
    </ng-container>
</div>
